﻿using CarAppDomain.Base;
using SqlSugar;

namespace CarAppDomain.CarType.Entities
{
    /// <summary>
    /// 车辆类型表
    /// </summary>
    [SugarTable("cartype", TableDescription = "车型")]
    public class CarTypeEntity : BaseEntity
    {
        /// <summary>
        /// 所属品牌代码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = false, ColumnDescription = "所属品牌代码")]
        public string? BrandId { get; set; }

        /// <summary>
        /// 所属车型代码（车系ID）
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = false, ColumnDescription = "所属车型代码")]
        public string? VehicleSeriesId { get; set; }

        /// <summary>
        ///车型中文名称
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 128, IsNullable = false, ColumnDescription = "车型中文名称")]
        public string? Name { get; set; }

        /// <summary>
        /// 车型英文名称
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 128, IsNullable = true, ColumnDescription = "车型英文名称")]
        public string? EnglishName { get; set; }

        /// <summary>
        /// 车型代码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 20, IsNullable = false, ColumnDescription = "车型代码")]
        public string? Code { get; set; }

        /// <summary>
        /// 车型型号
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 128, IsNullable = true, ColumnDescription = "车型型号")]
        public string? VehicleModel { get; set; }


        /// <summary>
        /// 销售区域Id
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = true, ColumnDescription = "销售区域")]
        public string? SaleAreaId { get; set; }

        /// <summary>
        /// 制造国Id
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = true, ColumnDescription = "制造国")]
        public string? ManufacturingCountryId { get; set; }

        /// <summary>
        /// 年代代码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 50, IsNullable = true, ColumnDescription = "年款代码")]
        public string? ModelYearCode { get; set; }

        /// <summary>
        ///目录号
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 50, IsNullable = true, ColumnDescription = "目录号")]
        public string? CatalogNo { get; set; }


        /// <summary>
        /// 上市时间
        /// </summary>
        [SugarColumn(ColumnDataType = "date", IsNullable = true, ColumnDescription = "上市时间")]
        public DateTime? MarketingTime { get; set; }

        /// <summary>
        /// 停产时间
        /// </summary>
        [SugarColumn(ColumnDataType = "date", IsNullable = true, ColumnDescription = "停产时间")]
        public DateTime? DownTime { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        [SugarColumn(ColumnDataType = "text", IsNullable = true, ColumnDescription = "图片")]
        public string? Image { get; set; }

        /// <summary>
        /// 车型类型【0：普通车型，1,：销售车型，2：精准车型】
        /// </summary>
        [SugarColumn(ColumnDataType = "int", IsNullable = false,DefaultValue ="0", ColumnDescription = "车型类型【0：普通车型，1,：销售车型，2：精准车型】")]
        public int VehicleType { get; set; }
    }
}
